﻿using Microsoft.AspNetCore.Components.WebView.Maui;
using Radius.Admin.Core;
using Rmac.Service.Config;

namespace Rmac;

public static class MauiProgram
{
	public static MauiApp CreateMauiApp()
	{
		var builder = MauiApp.CreateBuilder();
		builder
			.UseMauiApp<App>()
			.ConfigureFonts(fonts =>
			{
				fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
			});

		builder.Services.AddMauiBlazorWebView()	;

		#if DEBUG
			builder.Services.AddBlazorWebViewDeveloperTools();
		#endif

        builder.Services.AddSingleton<MaterialIssueSerivce>();
        builder.Services.AddSingleton<SysConfigService>();

        builder.Services.AddSqlSugar();

		return builder.Build();
	}
}
